<template>
    <div class="tableMessage">
        <el-card>
            <div
                    style="
          display: flex;
          justify-content: space-between;
          align-items: center;
          padding: 10px 0px;
        "
            >
                <div>
                    <el-button type="primary" size="mini" @click="searchComponent"
                    >搜索<i class="el-icon-search el-icon--right"></i
                    ></el-button>
                    <el-button type="primary" size="mini" @click="loadingData"
                    >刷新<i class="el-icon-refresh el-icon--right"></i
                    ></el-button>
                    <el-link style="margin-left:20px" href="https://int.ccwtech.net/format_csv_xlsx/" target="_blank" type="primary" v-if="userType == 3 || (currentOrg && currentOrg.agreement == '1')">app导出csv转xlsx</el-link>
                    <!--                    <el-button v-if="userType == 3 || (currentOrg && currentOrg.agreement == '1')" type="primary"-->
                    <!--                               size="mini"-->
                    <!--                               @click="downModel"-->
                    <!--                    >模板下载<i class="el-icon-download el-icon&#45;&#45;right"></i-->
                    <!--                    ></el-button>-->
                    <!--                    <UpLoadScvFile v-if="userType == 3 || (currentOrg && currentOrg.agreement == '1')"></UpLoadScvFile>-->
                    <!--                    <el-button style="margin-left: 15px" v-if="userType == 3" :disabled="multipleSelection.length == 0"-->
                    <!--                               type="danger" size="mini"-->
                    <!--                               @click="someState"-->
                    <!--                    >批量审核<i class="el-icon-magic-stick el-icon&#45;&#45;right"></i-->
                    <!--                    ></el-button>-->
                </div>
                <div></div>
                <!--                <el-button icon="el-icon-search" circle @click="searchComponent"></el-button>-->
                <div style="display: flex">
                    <div style="display: flex; align-items: center; font-weight: 600">
                        <div
                                style="
                width: 90px;
                height: 30px;
                background-color: rgb(251, 207, 127);
              "
                        ></div>
                        <span style="font-size: 14px; margin-left: 5px">用户已修改</span>
                    </div>
                    <div
                            style="
              display: flex;
              align-items: center;
              font-weight: 600;
              margin-left: 20px;
            "
                    >
                        <div
                                style="width: 90px; height: 30px; background-color: pink"
                        ></div>
                        <span style="font-size: 14px; margin-left: 5px">用户未修改</span>
                    </div>
                </div>
            </div>
            <el-table
                    empty-text="暂无数据"
                    size="small"
                    :cell-style="stateTypeStyle"
                    :data="tableData"
                    border
                    @selection-change="handleSelectionChange"
                    style="width: 100%"
                    class="feng_table"
            >
                <el-table-column
                        v-if="$store.state.user_type == 3"
                        align="center"
                        type="selection"
                        width="55">
                </el-table-column>
                <el-table-column
                        label="序号"
                        align="center"
                        fixed
                        type="index"
                        width="100">
                </el-table-column>
                <el-table-column
                        align="center"
                        fixed
                        prop="scope"
                        label="姓名"
                        width="150"
                >
                    <template slot-scope="scope">
            <span class="tableHeader" @click="tableContent(scope.row.id)">{{
                scope.row.name
              }}</span>
                    </template>
                </el-table-column>
                <el-table-column
                        align="center"
                        label="学员ID"
                        width="120"
                >
                    <template slot-scope="scope">
                        <span v-text="scope.row.user.username"></span>
                    </template>
                </el-table-column>
                <el-table-column
                        align="center"
                        label="报名机构"
                        width="240"
                >
                    <template slot-scope="scope">
                        <span v-text="scope.row.org.org_name.split('_')[0]"></span>
                    </template>
                </el-table-column>
                <el-table-column
                        align="center"
                        prop="exam_org.org_name"
                        label="报考机构"
                        width="240"
                >
                </el-table-column>

                <el-table-column
                        align="center"
                        prop="course.name"
                        label="科目"
                        width="170"
                >
                </el-table-column>
                <el-table-column
                        align="center"
                        prop="scope"
                        label="机构一审"
                        width="120"
                >
                    <template slot-scope="scope">
                        <!--                        {{state_map_style[scope.row.state_code]}} &#45;&#45; {{scope.row.note}}-->
                        <Item
                                style="width: 100%; height: 100%"
                                :stateType="'机构一审'"
                                :currentMessage="scope.row"
                                @chekcSuccess="chekcSuccess"
                                :pid="scope.row.id"
                                :state_code="scope.row.state_code"
                        ></Item>
                        <!--                        {{scope.row.state_code}}-->
                    </template>
                </el-table-column>
                <el-table-column
                        align="center"
                        prop="scope"
                        label="总部一审"
                        width="120"
                >
                    <template slot-scope="scope">
                        <Item
                                :stateType="'总部一审'"
                                :currentMessage="scope.row"
                                @chekcSuccess="chekcSuccess"
                                :pid="scope.row.id"
                                :state_code="scope.row.state_code"
                        ></Item>
                    </template>
                </el-table-column>

                <el-table-column
                        align="center"
                        prop="scope"
                        label="报考确认书"
                        width="150"
                >
                    <template slot-scope="scope">
                        <div v-if="scope.row.signed">
                            <el-popover
                                    placement="left-start"
                                    title="合同号"
                                    width="200"
                                    trigger="hover"
                                    :content="scope.row.contract_id">
                                <el-button size="mini" @click="lookTransation(scope.row.contract_id)"
                                           style="margin-right: 10px;"
                                           slot="reference">报考确认书
                                </el-button>
                            </el-popover>
                            <!--              <el-button size="mini" v-if="scope.row.state_code == 5 || scope.row.state_code == 7" @click="rejectContract(scope.row.id)">驳回</el-button>-->
                        </div>
                    </template>
                </el-table-column>

                <el-table-column
                        align="center"
                        prop="scope"
                        label="机构二审"
                        width="120"
                >
                    <template slot-scope="scope">
                        <Item
                                :currentOrg="currentOrg"
                                :signed="scope.row.signed"
                                :stateType="'机构二审'"
                                :isExam="scope.row.exam_date"
                                :currentMessage="scope.row"
                                @loding="loadingData"
                                @chekcSuccess="chekcSuccess"
                                :pid="scope.row.id"
                                :state_code="scope.row.state_code"
                                :exam_org="scope.row.exam_org"
                        ></Item>
                        <!-- {{scope.row.exam_org}} -->
                        <!--           :exam_org_name="scope.row.exam_org_name"             {{scope.row.state_code}}&#45;&#45;{{scope.row.exam_date == null}}-->
                    </template>
                </el-table-column>
                <!--                <el-table-column-->
                <!--                        align="center"-->
                <!--                        prop="scope"-->
                <!--                        label="是否复审"-->
                <!--                        width="120"-->
                <!--                >-->
                <!--                    <template slot-scope="scope">-->
                <!--                        <el-tag v-if="scope.row.is_preview">已复审</el-tag>-->
                <!--                        &lt;!&ndash; {{scope.row.exam_org}} &ndash;&gt;-->
                <!--                        &lt;!&ndash;           :exam_org_name="scope.row.exam_org_name"             {{scope.row.state_code}}&#45;&#45;{{scope.row.exam_date == null}}&ndash;&gt;-->
                <!--                    </template>-->
                <!--                </el-table-column>-->
                <el-table-column
                        align="center"
                        prop="scope"
                        label="总部二审"
                        width="120"
                >
                    <template slot-scope="scope">
                        <Item
                                :current-message="scope.row"
                                :stateType="'总部二审'"
                                @loding="loadingData"
                                :isExam="scope.row.exam_date"
                                @chekcSuccess="chekcSuccess"
                                :pid="scope.row.id"
                                :state_code="scope.row.state_code"
                        ></Item>
                    </template>
                </el-table-column>
                <el-table-column
                        align="center"
                        prop="scope"
                        label="当前状态"
                        width="200"
                >
                    <template slot-scope="scope">
                        <span>{{ state_map[scope.row.state_code] }}</span>
                    </template>
                </el-table-column>
                <el-table-column
                        align="center"
                        prop="scope"
                        label="证件类型"
                        width="100"
                >
                    <template slot-scope="scope">
                        <span>{{ scope.row.card_type_display }}</span>
                    </template>
                </el-table-column>
                <el-table-column
                        align="center"
                        prop="scope"
                        label="证件号码"
                        width="300"
                >
                    <template slot-scope="scope">
                        <span>{{ scope.row.card_id }}</span>
                    </template>
                </el-table-column>
                <el-table-column
                        align="center"
                        prop="phone"
                        label="手机号码"
                        width="120"
                >
                </el-table-column>
                <!--        <el-table-column align="center" prop="scope" label="驳回原因" width="300">-->
                <!--          <template slot-scope="scope">-->
                <!--            <span-->
                <!--              style="-->
                <!--                color: red;-->
                <!--                overflow: hidden;-->
                <!--                text-overflow: ellipsis;-->
                <!--                white-space: nowrap;-->
                <!--              "-->
                <!--              v-text="scope.row.note.split('<已编辑>')[0]"-->
                <!--            ></span>-->
                <!--          </template>-->
                <!--        </el-table-column>-->
                <el-table-column align="center" prop="scope" label="备注" width="300">
                    <template slot-scope="scope">
                        <el-input :disabled="userType == 2" size="small"
                                  @change="addDetail(scope.row.note,scope.row.id)"
                                  v-model="scope.row.note" placeholder="请输入备注信息"/>
                    </template>
                </el-table-column>
            </el-table>
        </el-card>


        <el-dialog width="66%" :visible.sync="dialogTableVisible">
            <span slot="title">
                <span style="font-size: 17px;margin-right: 10px">审核信息</span>
                <span style="font-size: 14px">{{currentData.course && currentData.course.name}}</span>
            </span>
            <el-descriptions title="报名信息" direction="vertical" :column="3" border size="mini" class="margin-top">
                <template slot="extra">
                    <!--                    <el-button-->
                    <!--                            v-if="!currentData.is_preview"-->
                    <!--                            @click="preView(currentData.id)"-->
                    <!--                            type="primary"-->
                    <!--                            size="small"-->
                    <!--                    >确认复审-->
                    <!--                    </el-button-->
                    <!--                    >-->
                    <el-button
                            @click="stateLog(currentData.id)"
                            type="primary"
                            size="small"
                    >审核日志
                    </el-button
                    >
                </template>
                <el-descriptions-item label="学员ID" v-if="currentData.user">{{currentData.user.username}}
                </el-descriptions-item>
                <el-descriptions-item label="学员姓名"> {{ currentData.name }}</el-descriptions-item>
                <el-descriptions-item label="您报读的培训机构" v-if="currentData.org">
                    {{String(currentData.org.org_name).split('_')[0]}}（{{currentData.org.org_code}}）
                </el-descriptions-item>
                <el-descriptions-item label="手机号码"> {{ currentData.phone }}</el-descriptions-item>
                <el-descriptions-item label="姓名拼音"> {{ currentData.last_py }} {{ currentData.first_py }}</el-descriptions-item>
                <el-descriptions-item label="单位名称"> {{ currentData.com_name }}</el-descriptions-item>
                <el-descriptions-item label="证件类型"> {{ currentData.card_type_display }}</el-descriptions-item>
                <el-descriptions-item label="证件号码"> {{ currentData.card_id }}</el-descriptions-item>
                <el-descriptions-item label="单位类型"> {{ currentData.com_type_display }}</el-descriptions-item>
                <el-descriptions-item label="性别"> {{ currentData.gender_display }}</el-descriptions-item>
                <el-descriptions-item label="出生日期">{{ currentData.birthday }}</el-descriptions-item>
                <el-descriptions-item label="从事薪酬管理(含薪税服务)工作年限(含实习经历)"> {{ currentData.work_age }}年
                </el-descriptions-item>
                <el-descriptions-item label="最高学历"> {{ currentData.hig_edu }}</el-descriptions-item>
                <el-descriptions-item label="毕业年份" v-if="currentData.grad_time">
                    {{ currentData.grad_time.split('-')[0] + '年' +currentData.grad_time.split('-')[1] + '月' }}
                </el-descriptions-item>
                <el-descriptions-item label="毕业年份" v-if="!currentData.grad_time"></el-descriptions-item>
                <el-descriptions-item label="工作区域"> {{ currentData.province }}/{{ currentData.city }}/{{currentData.region}}
                </el-descriptions-item>
                <el-descriptions-item label="相关专业"> {{ currentData.major }}</el-descriptions-item>
                <el-descriptions-item label="行业类型"> {{ currentData.ind_type_display }}</el-descriptions-item>
                <el-descriptions-item label="相关资质或证书"> {{ currentData.cert }}</el-descriptions-item>
                <el-descriptions-item label="电子邮箱"> {{ currentData.email }}</el-descriptions-item>
                <el-descriptions-item label="账号期限" v-if="currentData.exp_date"> {{ currentData.active_date.substr(0,10)}} 至 {{currentData.exp_date.substr(0,10)}}
                </el-descriptions-item>
                <el-descriptions-item label="账号期限" v-if="!currentData.exp_date">账号还未生成
                </el-descriptions-item>
                <el-descriptions-item label="职务" v-if="currentData.work_duty"><p
                        v-text="currentData.work_duty.split('#')[0]"></p>
                    <p v-text="currentData.work_duty.split('#')[1]"></p></el-descriptions-item>
                <el-descriptions-item label="审核状态"> {{
                    currentData.state_code == 5 && !currentData.exam_org ? '总部一审通过/待报考' : currentData.state_code > 3 ?
                    '报名信息审核完成' : state_map[currentData.state_code]
                    }}
                </el-descriptions-item>
            </el-descriptions>


            <el-descriptions v-show="currentData.exam_date" title="报考信息" style="margin-top: 20px" direction="vertical"
                             :column="3" border size="mini" class="margin-top">
                <template slot="extra">
                    <el-button
                            v-if="currentData.signed"
                            @click="lookTransation(currentData.contract_id)"
                            type="primary"
                            size="small"
                    >查看报考确认书
                    </el-button
                    >
                </template>
                <el-descriptions-item label="您报考的培训机构" v-if="currentData.exam_org"> {{ currentData.exam_org ?
                    currentData.exam_org.org_name:'' }}（{{currentData.exam_org.org_code}}）
                </el-descriptions-item>
                <el-descriptions-item label="是否属于再次报考"> {{ currentData.make_up_count > 0 ? '是':'否' }}
                </el-descriptions-item>
                <el-descriptions-item label="考试城市" v-if="currentData.exam_date"> {{ currentData.exam_date.exam_city }}
                </el-descriptions-item>
                <el-descriptions-item label="考试时间" v-if="currentData.exam_date"> {{ currentData.exam_date.exam_date }}
                </el-descriptions-item>
                <el-descriptions-item label="准考证号" v-if="currentData.state_code == 8"> {{ currentData.exam_code }}
                </el-descriptions-item>
                <el-descriptions-item label="审核状态"> {{ state_map[currentData.state_code] }}</el-descriptions-item>
            </el-descriptions>

        </el-dialog>

        <el-dialog v-if="stateLogList.length > 0" title="审核日志" :visible.sync="stateLogVisible">
            <el-table
                    :data="stateLogList"
                    :default-sort="{prop: 'add_time', order: 'descending'}"
                    style="width: 100%">
                <el-table-column
                        prop="add_time"
                        label="日期"
                        width="170"
                        sortable
                >
                    <template slot-scope="scope">
                        <span>{{ scope.row.add_time.substr(0, 19) }}</span>
                    </template>
                </el-table-column>
                <el-table-column
                        prop="scope"
                        label="审核状态"
                        width="150"
                >
                    <template slot-scope="scope">
                        <span>{{ state_map2[scope.row.method] }}</span>
                    </template>
                </el-table-column>
                <el-table-column
                        prop="note"
                        label="备注">
                </el-table-column>
            </el-table>
        </el-dialog>

        <el-dialog v-if="someStateResults" title="批量审核结果" :visible.sync="someSateResultVisible">
            <p style="text-align: left">成功条数:<span style="color: green">{{ someStateResults.success }}</span> 失败条数:<span
                    style="color: red">{{ someStateResults.failed.length }}</span></p>
            <el-table
                    :data="someStateResults.failed"
                    style="width: 100%">
                <el-table-column
                        prop="pid"
                        label="ID"
                        width="170"
                        sortable
                >
                </el-table-column>
                <el-table-column
                        prop="name"
                        label="姓名"
                        width="150"
                >
                </el-table-column>
                <el-table-column
                        prop="errors"
                        label="错误信息">
                </el-table-column>
            </el-table>
        </el-dialog>

        <el-dialog title="切换审核方法" :visible.sync="dialogSomeSateVisible" width="300px">
            <el-select size="small" v-model="someStateMethod" placeholder="请选择活动区域">
                <el-option label="总部一审" value="admin_pass_1"></el-option>
                <el-option label="总部二审" value="admin_pass_2"></el-option>
            </el-select>
            <div slot="footer" class="dialog-footer">
                <el-button size="small" @click="dialogSomeSateVisible = false">取 消</el-button>
                <el-button size="small" type="primary" @click="submitSomeState">确 定</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>
    import {viewContract, addDetail, stateLog, check, getOrg} from '../../request/api'
    import UpLoadScvFile from "../uploadCsvFile/UpLoadCsvFile.vue";
    import {userType} from "@/util/base";
    import Item from "../Item";
    import {formatDate} from "../../utils/formatDate";
    import {batchCheck} from "@/request/api";

    export default {
        name: "Table",
        filters: {
            formatDate2(time) {
                let date = new Date(time);
                return formatDate(date, 'yyyy年MM月dd日')
            },
            formatDate(time) {
                let date = new Date(time);
                return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
            },
            expDate(time) {
                let date = new Date(time);
                date.setFullYear(date.getFullYear() - 1);
                return formatDate(date, 'yyyy年MM月dd日')
            }
        },
        props: {
            tableData: {
                type: Array,
            },
            currentOrg: {
                type: Object
            }
        },
        data() {
            return {
                someStateResults: null,
                someSateResultVisible: false,
                dialogSomeSateVisible: false,
                someStateMethod: 'admin_pass_1',//批量审核方法
                stateLogList: [],
                stateLogVisible: false,
                userType: 0,
                searchIsShow: false,
                state_map2: {
                    org_pass_1: '机构一审通过',
                    admin_pass_1: '总部一审通过',
                    org_pass_2: '机构二审通过',
                    admin_pass_2: '总部二审通过',
                    org_reject_1: '机构一审驳回',
                    admin_reject_1: '总部一审驳回',
                    org_reject_2: '机构二审驳回',
                    admin_reject_2: '总部二审驳回',
                    contract_reject: '报考确认书驳回'
                },
                state_map_style: {
                    0: "机构一审驳回",
                    1: "机构一审",
                    2: "机构一审驳回",
                    3: "总部一审",
                    4: "机构二审驳回",
                    5: "机构二审",
                    6: "机构二审驳回",
                    7: "总部二审",
                    8: "全部审核通过",
                },
                state_map: {
                    0: "机构一审驳回",
                    1: "机构一审待审",
                    2: "总部一审驳回",
                    3: "总部一审待审",
                    4: "机构二审驳回",
                    5: "机构二审待审",
                    6: "总部二审驳回",
                    7: "总部二审待审",
                    8: "全部审核通过",
                },
                dialogTableVisible: false,
                currentData: {},
                multipleSelection: []
            };
        },
        computed: {},
        created() {
            console.log("table", this.$store.state.user_type);
            this.userType = this.$store.state.user_type;
        },
        methods: {
            submitSomeState() {
                this.dialogSomeSateVisible = false;
                console.log(this.multipleSelection, this.someStateMethod)
                batchCheck({pid_list: this.multipleSelection, method: this.someStateMethod}).then(res => {
                    console.log(res);
                    this.$message({type: 'success', message: '操作成功'})
                    this.someSateResultVisible = true;
                    this.someStateResults = res
                    this.$emit("loading");
                })
            },
            someState() {
                this.dialogSomeSateVisible = true;
            },
            //批量审核
            handleSelectionChange(val) {
                this.multipleSelection = [];
                for (let item of val) {
                    this.multipleSelection.push(item.id)
                }
            },
            currentLog() {
                console.log('获取当前审核日志');
            },
            preView(pid) {
                addDetail({pid: pid, note: '复审', preview: true}).then(res => {
                    console.log(res)
                    this.$message({type: 'success', message: '已提交'})
                    this.$emit("loading");
                })
            },
            downModel() {
                window.open('https://apii.ptaedu.cn/static/files/template_import.xls')
            },
            //合同驳回
            rejectContract(pid) {
                this.$confirm('是否对此合同进行驳回操作', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    let params = {pid: pid, method: 'contract_reject'}
                    check(params).then(res => {
                        console.log('合同驳回', res)
                        this.$message({
                            type: 'success',
                            message: '驳回成功!'
                        });
                    }).catch(err => {
                        this.$message({type: 'error', message: err.msg + '，' + err.errors})
                    })
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消'
                    });
                });
            },
            //总部添加备注信息
            addDetail(content, pid) {
                console.log('content', content + '-' + pid)
                this.$confirm('是否为改用户修改备注信息', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    let params = {'note': content, 'pid': pid, 'preview': false}
                    addDetail(params).then(res => {
                        console.log(res)
                    })
                    this.$message({
                        type: 'success',
                        message: '修改成功!'
                    });
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消'
                    });
                    this.loadingData();
                });
            },
            //查看合同
            lookTransation(contract_id) {
                viewContract({contract_id: contract_id}).then((res) => {
                    window.open(res.view_url);
                });
            },
            stateTypeStyle(column) {
                // console.log('当前信息',column.row)
                if (this.userType == 2) {
                    if (
                        column.columnIndex == 6 &&
                        column.row.state_code < 3 &&
                        column.row.exam_date == null
                    ) {
                        console.log('当前审核状态', column.row.audit_log.length)
                        if (
                            column.row.audit_log.length > 0 && column.row.audit_log[0].method.includes('reject') &&
                            column.row.audit_log[0].add_time > (column.row.last_edit_date || '2000-09-10')
                        ) {
                            console.log('未修改')
                            return "background-color:pink";
                        } else if (
                            column.row.audit_log.length > 0 && column.row.audit_log[0].method.includes('reject') &&
                            column.row.audit_log[0].add_time < (column.row.last_edit_date || '2000-09-10')
                        ) {
                            console.log('已修改')
                            return "background-color: #fbcf7f";
                        } else {
                            return "background-color:#fff";
                        }
                    }
                    if (
                        column.columnIndex == 9 &&
                        3 < column.row.state_code < 7 &&
                        column.row.exam_date != null &&
                        column.row.exam_org.org_code === this.currentOrg.org_code

                    ) {
                        if (
                            (column.row.audit_log.length > 0 && column.row.audit_log[0].method.includes('reject') &&
                                column.row.audit_log[0].add_time < (column.row.last_edit_date || '2000-09-10')) || (
                                column.row.audit_log && column.row.audit_log[0].method.includes('contract_reject') &&
                                column.row.signed
                            )
                        ) {
                            return "background-color:#fbcf7f";
                        } else if (
                            column.row.audit_log.length > 0 && column.row.audit_log[0].method.includes('reject') &&
                            column.row.audit_log[0].add_time > (column.row.last_edit_date || '2000-09-10')
                        ) {
                            return "background-color: pink";
                        } else {
                            return "background-color:#fff";
                        }
                    }
                }
                if (this.userType == 3){
                    if (
                        column.columnIndex == 11 &&
                        column.row.state_code == 7 &&
                        column.row.exam_date != null

                    ) {
                        if (column.row.audit_log && column.row.audit_log[0].method.includes('contract_reject') && column.row.signed) {
                            return "background-color:#fbcf7f";
                        } else if (column.row.audit_log && column.row.audit_log[0].method.includes('contract_reject') && !column.row.signed) {
                            return "background-color: pink";
                        } else {
                            return "background-color:#fff";
                        }
                    }
                }
                return "textAlign:center";
            },
            loadingData() {
                // alert('加载数据')
                this.$emit("loading");
            },
            handleClick(row) {
                console.log(row);
            },
            searchComponent() {
                this.searchIsShow = !this.searchIsShow;
                this.$emit("search", this.searchIsShow);
            },
            //审核成功
            chekcSuccess() {
                this.$emit("ItemCheckSuccess");
            },
            //审核日志
            stateLog(pid) {
                stateLog({pid: pid}).then(res => {
                    this.stateLogVisible = true
                    console.log('审核日志', res)
                    this.stateLogList = res.sort((a, b) => b.add_time - a.add_time);
                })
            },
            tableContent(item_id) {
                console.log('tableData', this.tableData)
                for (let item of this.tableData) {
                    if (item.id == item_id) {
                        this.currentData = item;
                        console.log(this.currentData);
                    }
                }
                this.dialogTableVisible = true;
            },
        },
        components: {
            Item,
            UpLoadScvFile,
        },
    };
</script>

<style>
    .el-table .el-table__cell {
        padding: 3px;
    }

    .tableMessage .el-tag {
        width: 100%;
    }
</style>

<style scoped>
    .tableHeader {
        color: #008b8b;
        cursor: pointer;
        font-weight: 700;
        border-bottom: 2px blueviolet solid;
    }

    .tableHeader:hover {
        color: rebeccapurple;
    }
</style>
